package com.light.component;

import com.light.layout.ModalDialog;
import javafx.collections.ObservableList;
import javafx.scene.control.ListView;
import javafx.scene.layout.HBox;

public class NoticePane extends ModalDialog {

    public NoticePane(String title, ObservableList<HBox> list) {
        super();
        header.setTitle(title);
        content.setBody(createContent(list));
        content.setFooter(null);
    }

    private HBox createContent(ObservableList<HBox> list) {
        ListView<HBox> listView = new ListView<>(list);
        listView.getStyleClass().add("du-list");
        listView.setMaxWidth(600);
        listView.setMinWidth(600);
        return new HBox(listView);
    }


}
